package com.nulldev.util.web.HttpServer3.extensions.websocket.frame.messages;

import com.nulldev.util.web.HttpServer3.extensions.websocket.frame.message.Message;

public class TextMessage implements Message<String> {

	private final String data;

	public TextMessage(final String data) {
		this.data = data;
	}

	public TextMessage(final byte[] data) {
		this.data = new String(data);
	}

	@Override
	public String getData() {
		return data;
	}
}